package com.zmn.oms.zmn.business.interfaces.entrust;

import com.zmn.oms.common.dto.ResultDTO;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.entity.entrust.EntrustOrderQuery;
import com.zmn.oms.model.dto.entrust.NewEntrustOrderDTO;
import com.zmn.oms.model.entity.entrust.EntrustOrder;

import java.util.List;

/**
 * 类描述：
 *
 * @author lhl
 * @date 2020/01/14 18:53
 */
public interface EntrustOrderBService {

    /**
     * 装备录单数据
     * @return
     * @throws OmsBaseException
     */
    EntrustOrder prepareInsertOrder(NewEntrustOrderDTO newEntrustOrderDTO) throws OmsBaseException;

    /**
     * 录入委托单
     * @return
     * @throws OmsBaseException
     */
    ResultDTO<EntrustOrder> doInsertOrder(EntrustOrder entrustOrder) throws OmsBaseException;

    /**
     * 查询委托单列表
     * @param query
     * @return
     * @throws OmsBaseException
     */
    ResultDTO<List<EntrustOrder>> listOrders(EntrustOrderQuery query) throws OmsBaseException;

    /**
     * 查询委托单
     * @param entrustId
     * @return
     * @throws OmsBaseException
     */
    ResultDTO<EntrustOrder> findById(Long entrustId) throws OmsBaseException;

    /**
     * 修改委托单
     * @param entrustOrder
     * @return
     * @throws OmsBaseException
     */
    ResultDTO updateById(EntrustOrder entrustOrder) throws OmsBaseException;


}
